package org.dromara.bclt.domain.vo;

import java.util.Date;
import org.dromara.bclt.domain.CourseStatus;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;

import java.io.Serial;
import java.io.Serializable;

import static org.dromara.common.translation.constant.TransConstant.*;


/**
 * 视频播放状态视图对象 bclt_course_status
 *
 * @author RRyuan
 * @date 2024-10-23
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = CourseStatus.class)
public class CourseStatusVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 课程观看记录id
     */
    @ExcelProperty(value = "课程观看记录id")
    private Long id;

    /**
     * 设备id
     */
    @ExcelProperty(value = "设备id")
    private Long deviceId;

    /**
     * 用户名称
     */
    @ExcelProperty(value = "用户名称")
    @Translation(type = TransConstant.DEVICE_ID_TO_NAME, mapper = "deviceId")
    private String deviceName;

    /**
     * 课程id
     */
    @ExcelProperty(value = "课程id")
    private Long courseId;

    /**
     * 课程名称
     */
    @ExcelProperty(value = "课程名称")
    @Translation(type = TransConstant.COURSE_ID_TO_NAME, mapper = "courseId")
    private Long courseName;

    /**
     * 播放完成状态
     */
    @ExcelProperty(value = "播放完成状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "bclt_course_status")
    private String courseStatus;

    /**
     * 首次完成时间
     */
    @ExcelProperty(value = "首次完成时间")
    private Date finishTime;

    /**
     * 当前播放进度
     */
    @ExcelProperty(value = "当前播放时长")
    private Integer playProgress;

    /**
     * 课程观看时长
     */
    @ExcelProperty(value = "课程观看时长")
    private Integer courseViewingDuration;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 创建人
     */
    @ExcelProperty(value = "创建人")
    private Long createBy;

    /**
     * 创建人姓名
     */
    @ExcelProperty(value = "创建人")
    @Translation(type = TransConstant.USER_ID_TO_NAME, mapper = "createBy")
    private String createByName;


    /**
     * 更新时间
     */
    @ExcelProperty(value = "更新时间")
    private Date updateTime;


}
